package com.wlr.littleprogram.controller;

import com.wlr.littleprogram.dto.Result;
import com.wlr.littleprogram.entity.CateVariety;
import com.wlr.littleprogram.service.CateVarietyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lrwang
 * @version 1.0
 * @date 2022/7/19 19:00
 */
@RestController
public class CateVarietyController {
    @Autowired
    CateVarietyService cateVarietyService;

    @GetMapping("/getAllCate")
    public Result getAllCate() {
        List<CateVariety> allCate = cateVarietyService.getAllCate();
        return Result.success(allCate);
    }
}
